package com.dgut.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * @TableName products
 */
@TableName(value = "products")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Products implements Serializable {
    /**
     * 商品编号
     */
    @TableId(value = "product_id", type = IdType.AUTO)
    private Long productId;

    /**
     * 商品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 商品描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 商品图片
     */
    @TableField(value = "product_img")
    private String productImg;

    /**
     * 成本价
     */
    @TableField(value = "standard_cost")
    private Integer standardCost;

    /**
     * 销售价
     */
    @TableField(value = "price")
    private Double price;

    /**
     * 重新订购存量
     */
    @TableField(value = "reorder_count")
    private Integer reorderCount;

    /**
     * 当前库存量
     */
    @TableField(value = "hand_count")
    private Integer handCount;

    /**
     * 最低库存量
     */
    @TableField(value = "target_count")
    private Integer targetCount;

    /**
     * 每单位数量
     */
    @TableField(value = "quantity_per_unit")
    private String quantityPerUnit;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 数量
     */
    @TableField(exist = false)
    private Integer quantity;
    /**
     * 删除标记
     */
    @TableLogic
    private Integer isDeleted;

    /**
     * 生产日期
     */
    private LocalDate produceDate;
}